<!-- 委托弹出 -->
<template>
  <div>
    <van-popup :value="show" position="bottom" @input="$emit('update:show', $event)">
      <div class="van-popup-content">
        <div style="color: #fff;justify-content: center;font-size: 20px;margin-bottom: 15px;">选择充币方式</div>

        <div v-for="(item, index) in options" :key="index" @click="handleClick(index)"
          style="justify-content: space-between;">
          <div class="flex items-center" style="gap: 10px;">
            <img :src="item.icon" alt="">
            <div style="flex-direction: column; align-items: start; gap: 1px;">
              <div>{{ item.text }}</div>
              <div style="color: #929292;">{{ item.detail }}</div>
            </div>
          </div>
          <van-icon name="arrow" />
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
import { Popup } from "vant";

export default {
  name: 'Entrust',
  components: {
    [Popup.name]: Popup,
  },
  props: {
    options: {
      type: Array,
      default: () => []
    },
    show: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
    }
  },
  methods: {
    handleClick(index) {
      this.$emit('select', this.options[index]);
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .van-popup {
  // width: 92% !important;
  background: #121212 !important;
  border-radius: 40px 40px 0 0;

  .van-popup-content {
    padding: 40px 30px;
    padding-bottom: 60px;
    background: #121212;
    color: #fff;
    display: grid;
    gap: 20px;
    position: relative;
    overflow: hidden;


    & div {
      display: flex;
      align-items: center;
      gap: 15px;
      font-size: 28px;
    }

    &>div {
      padding: 10px 0px;
      border-radius: 10px;
    }

  }
}
</style>